import 'package:flutter/material.dart';
//关于
class AboutPage extends StatelessWidget {
  const AboutPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('关于我们'),
        centerTitle: true,
        backgroundColor: Colors.white,
        foregroundColor: Colors.black,
        elevation: 0.5,
      ),
      backgroundColor: const Color(0xFFF2F2F2),
      body: Column(
        children: [
          const SizedBox(height: 40),

          // 图标 + 版本号
          Column(
            children: const [
              CircleAvatar(
                radius: 40,
                backgroundImage: AssetImage('assets/wechat_logo.png'), // 微信图标
              ),
              SizedBox(height: 12),
              Text(
                '微信 8.0.43',
                style: TextStyle(fontSize: 16, color: Colors.grey),
              ),
            ],
          ),

          const SizedBox(height: 30),

          // 列表功能区域
          Expanded(
            child: ListView(
              children: [
                buildItem('功能介绍'),
                buildItem('去评分'),
                buildItem('检查新版本'),
                buildItem('隐私政策'),
                buildItem('第三方信息'),
              ],
            ),
          ),

          // 底部版权信息
          const Padding(
            padding: EdgeInsets.only(bottom: 20),
            child: Text(
              '腾讯公司 版权所有',
              style: TextStyle(fontSize: 14, color: Colors.grey),
            ),
          ),
        ],
      ),
    );
  }

  // 构建列表项
  static Widget buildItem(String title) {
    return Column(
      children: [
        Container(
          color: Colors.white,
          child: ListTile(
            title: Text(title, style: const TextStyle(fontSize: 16)),
            trailing: const Icon(Icons.arrow_forward_ios, size: 16),
            onTap: () {
              // TODO: 点击逻辑
            },
          ),
        ),
        const Divider(height: 0.5, indent: 16),
      ],
    );
  }
}
